#!bin/sh
source /etc/profile
day=$(date +%Y-%m-%d)
yt=`date -d "1 days ago "  "+%Y-%m-%d"`
echo $day
cd /home/marvin/sqoop-1.4.6-cdh5.6.0

sh /home/marvin/daily_job/update/main/res_notoilDepartment_main.sh $day

sh /home/marvin/daily_job/update/main/res_notoilTop_main.sh $yt
sh /home/marvin/daily_job/update/main/res_notoilTop_vip_main.sh $yt

bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_oilPrice --export-dir /user/hive/warehouse/res_oilprice/ --input-fields-terminated-by ',' -m 1

bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_notoilDepartment_vip --export-dir /user/hive/warehouse/res_notoildepartment_vip/ --input-fields-terminated-by ',' -m 1

#i do

sh /home/marvin/daily_job/update/main/res_oil_main.sh
sh /home/marvin/daily_job/update/main/res_notoilDepartment_main.sh
sh /home/marvin/daily_job/update/main/res_notoilTop_main.sh $yt
sh /home/marvin/daily_job/update/main/res_notoilTop_vip_main.sh $yt
sh /home/marvin/daily_job/update/main/res_lube_main.sh
sh /home/marvin/daily_job/update/main/res_notoilRate_main.sh

sh /home/marvin/daily_job/update/main/res_notoilRate_vip_main.sh

sh /home/marvin/daily_job/update/main/res_mop_main.sh
sh /home/marvin/daily_job/update/main/res_mop_vip_main.sh
sh /home/marvin/daily_job/update/main/res_HHTIPT_main.sh

sh /home/marvin/daily_job/update/main/res_HHTIPT_vip_main.sh

sh /home/marvin/daily_job/update/main/res_oil_vip_main.sh

sh /home/marvin/daily_job/update/main/res_notoil_vip_main.sh

sh /home/marvin/daily_job/update/main/res_lube_vip_main.sh

sh /home/marvin/daily_job/update/main/res_addVip_main.sh

sh /home/marvin/daily_job/update/main/res_recharge_main.sh

sh /home/marvin/daily_job/update/main/res_recharge_cd_main.sh

sh /home/marvin/daily_job/update/main/res_addVip_cd_main.sh





#sh /home/marvin/daily_job/update/main/res_notoilRate_main.sh $day
#sh /home/marvin/daily_job/update/main/res_notoilRate_vip_main.sh $day

#sh /home/marvin/daily_job/update/main/res_HHTIPT_vip_main.sh $day

#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_tr --export-dir /user/hive/warehouse/res_tr --input-fields-terminated-by ',' -m 1

#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_mopipt --export-dir /user/hive/warehouse/res_mopipt/ --input-fields-terminated-by ',' -m 1

#sh /home/marvin/daily_job/update/main/res_oil_vip_main.sh $day

#sh /home/marvin/daily_job/update/main/res_notoil_vip_main.sh $day

#sh /home/marvin/daily_job/update/main/res_lube_vip_main.sh $day


#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_mophht_vip --export-dir /user/hive/warehouse/res_mophht_vip/ --input-fields-terminated-by ',' -m 1

#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_exceptLube_vip --export-dir /user/hive/warehouse/res_exceptlube_vip/ --input-fields-terminated-by ',' -m 1


#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_oil --export-dir /user/hive/warehouse/res_oil/ --input-fields-terminated-by ',' -m 1

#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_notoil --export-dir /user/hive/warehouse/res_notoil/ --input-fields-terminated-by ',' -m 1

#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_notoilDepartment --export-dir /user/hive/warehouse/res_notoildepartment/ --input-fields-terminated-by ',' -m 1

#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_notoilTop --export-dir /user/hive/warehouse/res_notoiltop/ --input-fields-terminated-by ',' -m 1

#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_lube --export-dir /user/hive/warehouse/res_lube/ --input-fields-terminated-by ',' -m 1
#sh /home/marvin/daily_job/update/main/res_lube_main.sh $day

#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_notoilRate --export-dir /user/hive/warehouse/res_notoilrate/ --input-fields-terminated-by ',' -m 1

#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_mop --export-dir /user/hive/warehouse/res_mop/ --input-fields-terminated-by ',' -m 1
#sh /home/marvin/daily_job/update/main/res_mop_main.sh  $day
#sh /home/marvin/daily_job/update/main/res_mop_vip_main.sh $day

#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_HHTIPT --export-dir /user/hive/warehouse/res_hhtipt/ --input-fields-terminated-by ',' -m 1
#sh /home/marvin/daily_job/update/main/res_HHTIPT_main.sh $day

#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_mophht --export-dir /user/hive/warehouse/res_mophht/ --input-fields-terminated-by ',' -m 1

#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_exceptLube --export-dir /user/hive/warehouse/res_exceptlube/ --input-fields-terminated-by ',' -m 1

#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_oil_vip --export-dir /user/hive/warehouse/res_oil_vip --input-fields-terminated-by ',' -m 1

#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_notoil_vip --export-dir /user/hive/warehouse/res_notoil_vip --input-fields-terminated-by ',' -m 1
#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_notoilTop_vip --export-dir /user/hive/warehouse/res_notoiltop_vip/ --input-fields-terminated-by ',' -m 1

#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_lube_vip --export-dir /user/hive/warehouse/res_lube_vip/ --input-fields-terminated-by ',' -m 1
#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_notoilRate_vip --export-dir /user/hive/warehouse/res_notoilrate_vip/ --input-fields-terminated-by ',' -m 1

#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_mop_vip --export-dir /user/hive/warehouse/res_mop_vip/ --input-fields-terminated-by ',' -m 1

#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_HHTIPT_vip --export-dir /user/hive/warehouse/res_hhtipt_vip/ --input-fields-terminated-by ',' -m 1

#bin/sqoop export --connect jdbc:mysql://192.168.0.34:3306/result --username root --password root --table res_mopipt_vip --export-dir /user/hive/warehouse/res_mopipt_vip/ --input-fields-terminated-by ',' -m 1
